package com.cct.digitalarchapi.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cct.digitalarchapi.pojo.DigitalArchMain;
import com.cct.digitalarchapi.pojo.Log4operate;
import com.cct.digitalarchapi.pojo.Message;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


@Repository
public interface MessageMapper extends BaseMapper<Message> {


    IPage<Message> getAllMessgaeByManage(IPage<Message> page, @Param("username") String username);

    IPage<Message> getStateMessgaeByManage(IPage<Message> page, @Param("username") String username ,@Param("state") int state);

    IPage<Message> getAllMessgaeByUser(IPage<Message> page, @Param("username") String username);

    IPage<Message> getStateMessgaeByUser(IPage<Message> page, @Param("username") String username ,@Param("state") int state);

    void addMessge(Message message);

    void updateState(@Param("messId") int messId ,@Param("state") int state);


}
